import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

// Vite configuration tailored for the Mint Health MVP.
export default defineConfig({
  plugins: [vue()],
  server: {
    port: 5175,
    host: '0.0.0.0',
    cors: true,
    allowedHosts: [
      'unexporting-overmelodiously-keila.ngrok-free.dev',
      '.ngrok-free.dev',
      '.ngrok.io',
      '.ngrok-free.app',
    ],
    hmr: {
      clientPort: 443,
      protocol: 'wss',
    },
    proxy: {
      '/api': {
        target: 'http://localhost:3000',
        changeOrigin: true,
      },
    },
  },
});
